const connect = require('connect');
const vhost = require('vhost');
const fs = require('fs');
const path = require('path');

const app = connect();
const sites = fs(path.join(__dirname, 'sites'));

sites.forEach(function (site) {
  console.log('  ... %s', site);
  app.use(vhost(site, require(site)));
});

app.listen(3000);
